home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1993 February
/
1993-02.d64
/
ezee design
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
32KB
|
1,038 lines
5 rem copyright 1993 compute publications intl ltd - all rights reserved
10 print"[147]"
20 dimx(40):gosub10270
30 poke 53280,15:poke 53281,9
40 a$="[158][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166]"
50 b$="[158][166] [166]"
60 print ""a$:for b=1 to 18
70 print b$:next b
80 print "[145]"a$
90 print tab(12)"[145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][158][161][172][162][146][190] "
100 print tab(12)"[158][161][188][146][187] [188][162] [146][190][172][172][187][146][187][172][172][187][146][187]"
110 print tab(12)"[158][161][146][161] [190][146][190] [161][172][162][146][190][161][172][162][146][190]"
120 print tab(12)"[158][190] [188][190] [188][146][162] [146][162][162] [146][162]":print
130 print tab(8)"[158][161][172][188][146] [172][187] "
140 print tab(8)"[158][161][146][161][161][146][161][172][172][187][146][187][172][172][162][146][190] [162][187] [172][172][187][146][161][161][172][187][146][187]"
150 print tab(8)"[158][161][146][161][190][146][190][161][172][162][146][190] [162][187][146][187] [161][146][161] [188][188][190][146][161][161][146][161][161][146][161]"
160 print tab(8)"[158][190] [188][146][162][162] [146][162][190] [146][162][162] [146][162][162][162][190][146][191][190][188][190][188][146]"
170 print
180 printtab(16)"(c) 1993":printtab(9)" compute publications
190 [153] [163]12)"sysby frank kirsch":[153]
200 [133]"sysinstructions y/n";v$
210 [139] v$[178]"n"[137]610
220 [153]"load"
230 [151] 53280,1:[151] 53281,1
240 [153] [163]10)"electronic formulae"
250 [153] [163]10)"usrusrusrusrusrusrusrusrusrusr usrusrusrusrusrusrusrusr"
260 [153][163]8)"verify"s1$;s3$;s2$ :[153]
270 [143] written by frank c. kirsch may 10,1987. revised april 18,1991
280 [153]"poke the program consists of equation sets"
290 [153]"associated with electronic problems."
300 [153]"to select an equation set, enter the number indicated on the menu.
310 print" for those equation sets which require"
320 print"a zero entry for the unknown value, "
330 print"zero is used to reset that variable and"
340 print"informs the computer which equation in"
350 print"the set to select. enter a zero "
360 print"by pressing the return key at the input prompt for the unknown value."
370 print"[151] other equations will require all of"
380 print"the inputs indicated in the instructionsfor each set."
390 print" the quantities which may be solved"
400 print"are shown in parentheses on the menu."
410 print:printtab(12)"(press any key)"
420 get h$:if h$="" then420
430 print"[147]":print:print:print
440 print"[151] when entering data, it is important to"
450 print"[145]enter values correctly. for example, if"
460 print"the computer requests capacitance in"
470 print"farads and the value to be entered is"
480 print".05mfd, this should be entered as "
490 print".00000005 farad or .05e-6 if using exponential entry."
500 :print
510 print" for convenience, the computer readout"
520 print"will often be in multiple values such "
530 print"as hertz, kilohertz, and megahertz .":print
540 print" after completing an equation, the"
550 print"user has the option of repeating the"
560 print"set, returning to the menu, or skipping"
570 print"directly to another equation set and"
580 print"bypassing the menu.":print:print
590 print:print tab(12)"(press any key)"
600 get h$:if h$="" then600
610 print"[147]": poke 53280,1:poke 53281,1
620 print tab(8)"------enter number------":print
630 print"capacitor--charge/energy---(q,c,e,w)=1"
640 print"capacitor--plate---------(k,c,s,n,d)=2"
650 print"capacitor--reactance--------(xc,f,c)=3"
660 print"capacitors--in series-----(c1,c2.ct)=4"
670 print"capacitors-parallel-------------(ct)=5"
680 print"capacitor--time constant-----(c,r,t)=6":print
690 print"[152]coil-rf air single layer----(#1 l,n)=7"
700 print"coil-rf/specify wire ga.-(#2 n,lgth)=8":print
710 print"db,watts,volts,or amps----(db,w,e,i)=9":print
720 print"[152]frequency--resonant---------(fr,l,c)=10"
730 print"frequency, wavelength, period"
740 print" of sinewave-----------------(f,w,t)=11":print
750 print"impedance--parallel-----(#1 xc,xl,r)=12"
760 print"impedance--parallel-----(#2 r,z1,zt)=13"
770 print"impedance--series-------(#1 xc,xl,r)=14"
780 print"impedance--series-------(#2 r,z1,zt)=15":print
790 print"return for page #2. page #1"
800 input"equation set no.";eq
810 print:print:print"[151]"
820 if eq>27 then800
830 if eq>0 then1040
840 print tab(8)"------enter number------":print
850 print"impedance--series/parallel"
860 print" using----------------(rl,xl//rc,xc)=16":print
870 print"[152]inductors--parallel-------(l1,l2,lt)=17"
880 print"inductors--series---------------(lt)=18"
890 print"inductor--reactance---------(xl,f,l)=19"
900 print"inductor--time constant------(l,r,t)=20":print
910 print"ohms law--(ac)---------------(i,e,z)=21"
920 print"ohms law--(dc)---------------(i,e,r)=22":print
930 print"[152]peak,peak/peak,avg.& rms conversions=23":print
940 print"resistance--parallel------(r1,r2,rt)=24"
950 print"resistance--series--------------(rt)=25"
960 print"resistor color code-----(ohms/color)=26":print
970 print"[152]simultaneous equations--------------=27"
980 print:print:print
990 print"return for page #1. page #2"
1000 input"equation set no.";eq
1010 print"[151]"
1020 if eq<1 then620
1030 if eq>27 then1000
1040 on eq goto5050 ,3020,2270,2860,7360,1440,5610,6220,8480,1750,5200,3980,6570
1050 z=eq-13
1060 on z goto3510,6880,4530,2700,8330,2020,1600,5450,1330,1090,2550,7210,7510
1070 z1=eq-26
1080 on z1 goto9090
1090 print"[147]":gosub10270
1100 print"peak,peak/peak,avg. and rms values for"
1110 print"[183][183][183][183][160][183][183][183][183][183][183][183][183][183] [183][183][183][183] [183][183][183] [183][183][183] [183][183][183][183][183][183] [183][183][183]"
1120 print tab(4)"sine wave voltage or currents."
1130 print tab(4)"[183][183][183][183][160][183][183][183][183][160][183][183][183][183][183][183][183][160][183][183][160][183][183][183][183][183][183][183][183][183]"
1140 print"enter known i or e value at the proper input,enter a zero for all others."
1150 print
1160 input "[151]peak(i or e) =";b
1170 input "peak/peak(i or e) =";pp
1180 input "average(i or e) =";a
1190 input "rms(i or e) =";r:print
1200 if b>0 goto1260
1210 if pp>0 then b=pp/2:goto1260
1220 if a>0 then b=a/.637:goto1260
1230 if r>0 then b=r/.707:goto1260
1240 if b+pp+a+r=0 then gosub9980
1250 goto1090
1260 p=b:pp=2*b:a=.637*b:r=.707*b
1270 print "[151]peak(i or e) =";b:print
1280 print "peak to peak(i or e)=";pp:print:print "avg.(i or e) =";a:print
1290 print "rms(i or e) =";r:print:print
1300 gosub9840
1310 if c$="r" then1090
1320 goto6150
1330 print"[147]":gosub10270
1340 print tab(14)"ohms law dc"
1350 print tab(14)"[183][183][183][183] [183][183][183] [183][183]":print
1360 print"input a zero for either i,e, or r.":print"[151]"
1370 input "i(amps)";a:input "e(volts)";b:input "r(ohms)";c
1380 gosub9870 :if er=1 then goto1330
1390 w=a*b:print:print
1400 print"amps =";a:print:print"volts =";b:print
1410 print"ohms=";c:print:print"watts =";w:print:gosub9840
1420 if c$="r" then1330
1430 goto6150
1440 print"[147]":gosub10270
1450 print tab(10)"rc time constants"
1460 print tab(10)"[183][183] [183][183][183][183] [183][183][183][183][183][183][183][183][183]":print
1470 print"input a zero for either t, c, or r.":print:print"[151]"
1480 input "t(seconds)";b:input "c(farads)";c:input "r(ohms)";a
1490 z1$="charge":z2$="discharge"
1500 gosub9870
1510 print"[147]"
1520 print"[149]second=";b,"farad=";c:print"ohms=";a
1530 print"[149]milsec=";b*10^3,"mfd=";c*10^6:print"kilohms=";a/10^3
1540 print"[149]mic.sec=";b*10^6,"pf.=";c*10^12:print"megohm=";a/10^6:print
1550 a=b
1560 gosub10000
1570 gosub9840
1580 if c$="r" then1440
1590 goto6150
1600 print"[147]":gosub10